<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增售卖机物品信息')" />
    <th:block th:include="include :: select2-css"/>
    </head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-smjGoodList-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">实际通道编码：</label>
                <div class="col-sm-8">
                    <textarea name="realChannelCode" class="form-control" required></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">归属机器编码：</label>
                <div class="col-sm-8">
                    <textarea name="machineId" class="form-control" required></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">物品状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('null')}">
                        <input type="radio" th:id="${'goodStatus_' + dict.dictCode}" name="goodStatus" th:value="${dict.dictValue}" th:checked="${dict.default}">
                        <label th:for="${'goodStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">物品货道：</label>
                <div class="col-sm-8">
                    <textarea name="goodHd" class="form-control" required></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">物品货道：</label>
                <div class="col-sm-8">
                    <textarea name="goodUrl" class="form-control" required></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">物品价格：</label>
                <div class="col-sm-8">
                    <input name="goodPrice" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">物品剩余数量：</label>
                <div class="col-sm-8">
                    <input name="goodNum" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">null：</label>
                <div class="col-sm-8">
                    <input name="createUser" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">null：</label>
                <div class="col-sm-8">
                    <input name="updateUser" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js"/>

            <script type="text/javascript">
        var prefix = ctx + "business/smjGoodList"
        $("#form-smjGoodList-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-smjGoodList-add').serialize());
            }
        }
    </script>
</body>
</html>
